﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <title>@ViewBag.Title</title>
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/layer")
    @Scripts.Render("~/bundles/weui")
    @Scripts.Render("~/bundles/swiper")
    @Scripts.Render("~/bundles/city-picker")
    @Scripts.Render("~/bundles/mmenu")
    @Scripts.Render("~/bundles/common")
    @Scripts.Render("~/bundles/json2")

    <script src="~/Scripts/jquery.lazyload.js"></script>
    <script src="~/Scripts/jquery.goup.js"></script>

    @Styles.Render("~/Content/weui")
    @Styles.Render("~/Content/css")
    @Styles.Render("~/Content/mmenu")
    <script type="text/javascript">
        $(function () {
            //$('nav#menu').mmenu({ navbar: { title: "中保金服" } });
            var timestamp = "@int.MaxValue";
            if ("@(TempData["timestamp"] != null && !string.IsNullOrEmpty(TempData["timestamp"].ToString()))" == "True") {
                timestamp = "@TempData["timestamp"]";
            }
            var timeDiff = (new Date().getTime()) - parseInt(timestamp);
             //小于2秒代表是非后退操作 取决于razor视图的渲染速度
            if (timeDiff < 2000 && "@(TempData["Msg"] != null && !string.IsNullOrEmpty(TempData["Msg"].ToString()))" == "True") {
                var index = layer.load();
                setTimeout(function () { layer.alert(HtmlUtil.htmlDecode("@TempData["Msg"]"), { icon: "@(TempData["success"])" == "False" ? 2 : 1 }); }, 200);
                layer.close(index);
            }
        });
    </script>
</head>
<body>
    @RenderBody()
    @RenderSection("scripts", required: false)
</body>
</html>
